import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    component: HomeView,
    redirect: '/sys-admin',
    children: [
      {
        path: '/sys-admin',
        component: () => import('../views/sys-admin/SystemAdminIndex.vue')
      },
      {
        path: '/sys-admin/product/banner',
        component: () => import('../views/sys-admin/product/BannerView.vue')
      },
      {
        path: '/goodsAddNew',
        component: () => import('../views/goods/GoodsAddNew.vue')
      },
      {
        path: '/goodsAddNew1',
        component: () => import('../views/goods/GoodsAddNew1.vue')
      }, {
        path: '/goodsAddNew2',
        component: () => import('../views/goods/GoodsAddNew2.vue')
      },{
        path: '/goodsAddNew3',
        component: () => import('../views/goods/GoodsAddNew3.vue')
      },{
        path: '/goodslist',
        component: () => import('../views/goods/GoodsList.vue')
      },{
        path: '/updategoods',
        component: () => import('../views/goods/UpdateGoods.vue')
      },{
        path: '/pack',
        component: () => import('../views/goods/PacksList.vue')
      },{
        path: '/press',
        component: () => import('../views/goods/PressList.vue')
      },{
        path: '/categoryGoods',
        component: () => import('../views/goods/CategoryGoods')
      }, {
        path: '/hot',
        component: () => import('../views/sys-admin/product/HotSearch.vue')
      },{
        path: '/activity',
        component: () => import('../views/sys-admin/product/Activity.vue')
      },
      {
        path: '/comment',
        component: () => import('../views/sys-admin/product/Comment.vue')
      }, {
        path: '/adminuser',
        component: () => import('../views/sys-admin/product/AdminUser.vue')
      },{
        path: '/admin',
        component: () => import('../views/sys-admin/product/Admin.vue')
      }, {
        path: '/orders1',
        component: () => import('../views/orders/Oeders1.vue')
      },{
        path: '/orders2',
        component: () => import('../views/orders/Oeders2.vue')
      },{
        path: '/orders3',
        component: () => import('../views/orders/Oeders3.vue')
      },{
        path: '/orders4',
        component: () => import('../views/orders/Oeders4.vue')
      }, {
        path: '/orders5',
        component: () => import('../views/orders/Oeders5.vue')
      }, {
        path: '/orders1-1',
        component: () => import('../views/orders/Oeders1-1.vue')
      }, {
        path: '/notice',
        component: () => import('../views/sys-admin/product/Notice.vue')
      },{
        path: '/notice',
        component: () => import('../views/sys-admin/product/Notice.vue')
      },
    ]
  },
  {
    path: '/',
    component: () => import('../views/LoginView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
